//封装：隐藏程序的实现细节，只给用户暴露使用的方法
/*
* 1.属性私有化
* 2.给私有化的属性添加set(获得）、get(设置）方法
* 3.给这个类添加空参构造和有参构造
* 4.给这个类添加tostring()方法
* */
public class Fengzhuang {
    private String brand;
    private double price;
    private int ram;

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public int getRam() {
        return ram;
    }

    public void setRam(int ram) {
        this.ram = ram;
    }

    public Fengzhuang() {
    }
    public Fengzhuang(String brand, double price, int ram) {
        this.brand = brand;
        this.price = price;
        this.ram = ram;
    }

    @Override
    public String toString() {
        return "Fengzhuang{" +
                "brand='" + brand + '\'' +
                ", price='" + price + '\'' +
                ", ram=" + ram +
                '}';
    }
}
